﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 产品料号基础输入参数
/// </summary>
public class PartnumBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 产品编码
    /// </summary>
    public virtual string? PartNumCoding { get; set; }
    
    /// <summary>
    /// 产品名称
    /// </summary>
    public virtual string? PartNumName { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>
    public virtual string? SpeciFicationNumber { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>
    [Dict("Unit-of-product-part-number", AllowNullValue=true)]
    public virtual string? PartNumUnit { get; set; }
    
    /// <summary>
    /// 预警值
    /// </summary>
    public virtual string? PartNumPreWarning { get; set; }
    
    /// <summary>
    /// 群组类型
    /// </summary>
    [Dict("Dictionary-of-the-main-data-group-type", AllowNullValue=true)]
    public virtual string? PartNumType { get; set; }
    
    /// <summary>
    /// 群组
    /// </summary>
    public virtual long? MasterDataId { get; set; }
    
    /// <summary>
    /// 产品描述
    /// </summary>
    public virtual string? PartNumDescribe { get; set; }
    
}

/// <summary>
/// 产品料号分页查询输入参数
/// </summary>
public class PagePartnumInput : BasePageInput
{
    /// <summary>
    /// 产品编码
    /// </summary>
    public string? PartNumCoding { get; set; }
    
    /// <summary>
    /// 产品名称
    /// </summary>
    public string? PartNumName { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>
    public string? SpeciFicationNumber { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>
    [Dict("Unit-of-product-part-number", AllowNullValue=true)]
    public string? PartNumUnit { get; set; }
    
    /// <summary>
    /// 预警值
    /// </summary>
    public string? PartNumPreWarning { get; set; }
    
    /// <summary>
    /// 群组类型
    /// </summary>
    [Dict("Dictionary-of-the-main-data-group-type", AllowNullValue=true)]
    public string? PartNumType { get; set; }
    
    /// <summary>
    /// 群组
    /// </summary>
    public long? MasterDataId { get; set; }
    
    /// <summary>
    /// 产品描述
    /// </summary>
    public string? PartNumDescribe { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 产品料号增加输入参数
/// </summary>
public class AddPartnumInput
{
    /// <summary>
    /// 产品编码
    /// </summary>
    [MaxLength(32, ErrorMessage = "产品编码字符长度不能超过32")]
    public string? PartNumCoding { get; set; }
    
    /// <summary>
    /// 产品名称
    /// </summary>
    [MaxLength(32, ErrorMessage = "产品名称字符长度不能超过32")]
    public string? PartNumName { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>
    [MaxLength(32, ErrorMessage = "规格型号字符长度不能超过32")]
    public string? SpeciFicationNumber { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>
    [Dict("Unit-of-product-part-number", AllowNullValue=true)]
    [MaxLength(32, ErrorMessage = "单位字符长度不能超过32")]
    public string? PartNumUnit { get; set; }
    
    /// <summary>
    /// 预警值
    /// </summary>
    [MaxLength(32, ErrorMessage = "预警值字符长度不能超过32")]
    public string? PartNumPreWarning { get; set; }
    
    /// <summary>
    /// 群组类型
    /// </summary>
    [Dict("Dictionary-of-the-main-data-group-type", AllowNullValue=true)]
    [MaxLength(32, ErrorMessage = "群组类型字符长度不能超过32")]
    public string? PartNumType { get; set; }
    
    /// <summary>
    /// 群组
    /// </summary>
    public long? MasterDataId { get; set; }
    
    /// <summary>
    /// 产品描述
    /// </summary>
    [MaxLength(32, ErrorMessage = "产品描述字符长度不能超过32")]
    public string? PartNumDescribe { get; set; }
    
}

/// <summary>
/// 产品料号删除输入参数
/// </summary>
public class DeletePartnumInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 产品料号更新输入参数
/// </summary>
public class UpdatePartnumInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 产品编码
    /// </summary>    
    [MaxLength(32, ErrorMessage = "产品编码字符长度不能超过32")]
    public string? PartNumCoding { get; set; }
    
    /// <summary>
    /// 产品名称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "产品名称字符长度不能超过32")]
    public string? PartNumName { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "规格型号字符长度不能超过32")]
    public string? SpeciFicationNumber { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>    
    [Dict("Unit-of-product-part-number", AllowNullValue=true)]
    [MaxLength(32, ErrorMessage = "单位字符长度不能超过32")]
    public string? PartNumUnit { get; set; }
    
    /// <summary>
    /// 预警值
    /// </summary>    
    [MaxLength(32, ErrorMessage = "预警值字符长度不能超过32")]
    public string? PartNumPreWarning { get; set; }
    
    /// <summary>
    /// 群组类型
    /// </summary>    
    [Dict("Dictionary-of-the-main-data-group-type", AllowNullValue=true)]
    [MaxLength(32, ErrorMessage = "群组类型字符长度不能超过32")]
    public string? PartNumType { get; set; }
    
    /// <summary>
    /// 群组
    /// </summary>    
    public long? MasterDataId { get; set; }
    
    /// <summary>
    /// 产品描述
    /// </summary>    
    [MaxLength(32, ErrorMessage = "产品描述字符长度不能超过32")]
    public string? PartNumDescribe { get; set; }
    
}

/// <summary>
/// 产品料号主键查询输入参数
/// </summary>
public class QueryByIdPartnumInput : DeletePartnumInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataPartnumInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 产品料号数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportPartnumInput : BaseImportInput
{
    /// <summary>
    /// 产品编码
    /// </summary>
    [ImporterHeader(Name = "产品编码")]
    [ExporterHeader("产品编码", Format = "", Width = 25, IsBold = true)]
    public string? PartNumCoding { get; set; }
    
    /// <summary>
    /// 产品名称
    /// </summary>
    [ImporterHeader(Name = "产品名称")]
    [ExporterHeader("产品名称", Format = "", Width = 25, IsBold = true)]
    public string? PartNumName { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>
    [ImporterHeader(Name = "规格型号")]
    [ExporterHeader("规格型号", Format = "", Width = 25, IsBold = true)]
    public string? SpeciFicationNumber { get; set; }
    
    /// <summary>
    /// 单位 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public string? PartNumUnit { get; set; }
    
    /// <summary>
    /// 单位 文本
    /// </summary>
    [Dict("Unit-of-product-part-number")]
    [ImporterHeader(Name = "单位")]
    [ExporterHeader("单位", Format = "", Width = 25, IsBold = true)]
    public string PartNumUnitDictLabel { get; set; }
    
    /// <summary>
    /// 预警值
    /// </summary>
    [ImporterHeader(Name = "预警值")]
    [ExporterHeader("预警值", Format = "", Width = 25, IsBold = true)]
    public string? PartNumPreWarning { get; set; }
    
    /// <summary>
    /// 群组类型 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public string? PartNumType { get; set; }
    
    /// <summary>
    /// 群组类型 文本
    /// </summary>
    [Dict("Dictionary-of-the-main-data-group-type")]
    [ImporterHeader(Name = "群组类型")]
    [ExporterHeader("群组类型", Format = "", Width = 25, IsBold = true)]
    public string PartNumTypeDictLabel { get; set; }
    
    /// <summary>
    /// 群组 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? MasterDataId { get; set; }
    
    /// <summary>
    /// 群组 文本
    /// </summary>
    [ImporterHeader(Name = "群组")]
    [ExporterHeader("群组", Format = "", Width = 25, IsBold = true)]
    public string MasterDataFkDisplayName { get; set; }
    
    /// <summary>
    /// 产品描述
    /// </summary>
    [ImporterHeader(Name = "产品描述")]
    [ExporterHeader("产品描述", Format = "", Width = 25, IsBold = true)]
    public string? PartNumDescribe { get; set; }
    
}
